//
//  NTESLiveInnerView.h
//  Netease
//
//  Created by 王方伟 on 2017/8/28.
//  Copyright © 2017年 wfw. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "NTESMicConnector.h"
#import <NIMSDK/NIMSDK.h>

@protocol NTESLiveInnerViewDelegate <NSObject>
@optional

- (void)onCloseLiving;
- (void)onClosePlaying;
- (void)onCloseBypassing;
- (void)onActionType:(NTESLiveActionType)type sender:(id)sender; //点击InnerView上的按钮
- (BOOL)onSelectVideoQuality:(NTESLiveQuality)quality sender:(id)sender; //点击InnerView上的
- (void)didSendText:(NSString *)text;
- (void)onTapChatView:(CGPoint)point;

@end

@interface NTESLiveInnerView : UIView
@property (nonatomic,weak) id<NTESLiveInnerViewDelegate> delegate;

- (instancetype)initWithChatroom:(NSString *)chatroomId frame:(CGRect)frame;
- (void)switchToWaitingUI;
- (void)switchToPlayingUI;
- (void)switchToLinkingUI;
- (void)switchToEndUI;
- (void)switchToBypassStreamingUI:(NTESMicConnector *)connector;
- (void)switchToBypassingUI:(NTESMicConnector *)connector;

- (void)refreshChatroom:(NIMChatroom *)chatroom;
- (void)updateQualityButton:(BOOL)isHigh;
- (CGFloat)getActionViewHeight;

//聊天
- (void)addMessages:(NSArray<NIMMessage *> *)messages;
- (void)addPresentMessages:(NSArray<NIMMessage *> *)messages;
- (void)fireLike;
- (void)updateConnectorCount:(NSInteger)count;
- (void)switchToBypassLoadingUI:(NTESMicConnector *)connector;
- (void)updateRemoteView:(NSData *)yuvData width:(NSUInteger)width height:(NSUInteger)height;
- (void)updateUserOnMic;

@end
